Fix/support ts v6#190
Merged
Merged
Conversation
Owner
nonara
commented
May 1, 2026
- closes Fix #187: support TypeScript v6 and let test features work. #188
- fixes Not working with TypeScript v6.0 update #187
BREAKING CHANGE: Node.js 22.12.0 or newer is now required.
Removes the legacy esm package fallback and loads compiled ESM transformer output through native Node require(esm). Forced-ESM .cts transformer entries are now rejected with a clear error pointing to .mts or removing isEsm. Re-enables ESM transformer coverage and removes stale missing-esm fixture scaffolding. Includes a small TsInstance typing fix so the patch self-build sees the originalCreateProgram augmentation under the TS 5.9 baseline. BREAKING CHANGE: removes the optional esm package fallback. ESM transformer loading now relies on Node >=22.12.0 native ESM support. Configuring isEsm: true on a .cts transformer entry is now rejected.
…require wrap with module.registerHooks Drop ts-node for TypeScript transformer loading, replace it with direct TypeScript compiler API compilation and format classification, and swap the previous require-wrapper module interception for Node module.registerHooks(). Transformer source now supports nested TS imports, transformer tsConfig options, path aliases, package/module format inference, inline source maps, and scoped hook deregistration without relying on ts-node at runtime. Classify transformer load format through TypeScript per-file emit-format workers so .mts/.cts, package "type", NodeNext semantics, and explicit transformer tsConfig settings follow compiler behavior. Known non-Node module wrappers are rejected, None/undecided formats fall back to the legacy CJS runtime behavior, and unknown future module kinds are treated as ESM. Add module-format coverage for extension semantics, package/module inference, transformer tsConfig, unsupported module kinds, and runtime guidance for CJS/ESM mismatch cases. BREAKING CHANGE: raises the Node.js floor to >=22.15.0 for module.registerHooks(). TypeScript transformer loading no longer uses ts-node; transformer module format is inferred from TypeScript compiler semantics, and the public isEsm option has been removed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.